<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCategoriesTable extends Migration
{
    //提交
    public function up()
    {
        Schema::create('categories', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->string('name')->comment('栏目');
            $table->string('pid')->comment('父级栏目');
//            $table->text('content')->comment('内容|simditor');
//            $table->string('thumb')->comment('缩略图|image');
//            $table->integer('click')->comment('查看次数|input');
//            $table->tinyInteger('iscommend')->default(1)->comment('推荐|radio|1:是,2:否');
        });
    }

    //回滚
    public function down()
    {
        Schema::dropIfExists('categories');
    }
}
